﻿using System.Web.Mvc;
using TZL.Web.Data;

namespace TZL.Web.Controllers
{
    public class NewsController : Controller
    {
        // GET: News
        public ActionResult Index(int id)
        {
            //var list = SqlDataHelper.Instance.SelectNews(id, pageIndex, pageSize);
            ViewBag.CategoryId = id;
            ViewBag.pageSize = 10;
            ViewBag.pageCount = SqlDataHelper.Instance.SelectNewsTotalPage(id, ViewBag.pageSize);
            
            return View();
        }

        public ActionResult Detail(int id)
        {
            var model = SqlDataHelper.Instance.SelectNewsById(id);
            return View(model);
        }

        public ActionResult Skilledmigration()
        {
            return View();
        }

        public ActionResult School(int id)
        {
            ViewBag.Id = id;
            return View();
        }

        public ActionResult Education()
        {
            return View();
        }

        public ActionResult Job()
        {
            return View();
        }
    }
}